home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume4 / xperfmon.patch / patch1 next >
Encoding:
Internet Message Format  |  1989-05-21  |  3.4 KB

  1. Path: uunet!island!argv
  2. From: argv@island.uu.net (Dan Heller)
  3. Newsgroups: comp.sources.x
  4. Subject: v04i004:  xperfmon, Patch1
  5. Message-ID: <762@island.uu.net>
  6. Date: 20 May 89 19:05:59 GMT
  7. Organization: Island Graphics, Marin County, California
  8. Lines: 95
  9. Approved: island!argv@sun.com
  10.  
  11. Submitted-by: Lee Duncan <duncan@dg-rtp.dg.com>
  12. Posting-number: Volume 4, Issue 4
  13. Archive-name: xperfmon.patch/patch1
  14.  
  15. [ I don't know what patchlevel this is; it assumes you've had all the
  16.   latest patches, I guess.  --argv ]
  17.  
  18. I recently got some xperfmon fixes from comp.sources.x
  19. (article <735@island.u.net>) and applied them to our sources, since
  20. our xperfmon wouldn't run.  After applying the listed changes,
  21. xperfmon still wouldn't run.  So, since I had a few extra minutes, I
  22. decided to try to figure out what was wrong.
  23.  
  24. It turns out that the C compiler on my Sun (SunOS 4.0, Sun 3/60),
  25. for some reason, when you try to pass a char and/or char ptr as a
  26. function param, it sometimes pukes.  So, I fixed some offending code
  27. and surprise, xperfmon now runs.
  28.  
  29. Since I haven't heard anything about this in this group, it may be
  30. that nobody else has had/will have this problem.  But a friend talked
  31. me into posting these changes anyway, just in case.
  32.  
  33. So, on SunOS 4.0, if you get core dumps with an xperfmon that should work
  34. (e.g. you've applied the changes cited above), then try this:
  35.  
  36. W. Lee Duncan, Data General, RTP     - "How can you be two places at once
  37. UUCP: {world}!mcnc!rti!dg-rtp!duncan -  when you're really no place at all"
  38. DOMAIN: duncan@dg-rtp.dg.com         -                Firesign Theatre
  39.  
  40. -----------------------------------------------------------------------
  41.  
  42. Files that change: xperfmon.c, and window.c:
  43.  
  44. csh> diff -c window.c orig/window.c
  45.  
  46. *** window.c    Thu May 18 09:43:26 1989
  47. --- orig/window.c    Thu May 18 09:43:52 1989
  48. ***************
  49. *** 801,807 ****
  50.   }
  51.   
  52.   short check_win_events(ch)
  53. ! int    *ch;  /* This is intended to be a pointer to a single character */
  54.   /* This routine returns a constant starting with WE_ defined in window.h.  It
  55.      takes care of handling all window events and is called from 
  56.      main_event_loop() in xperfmon.c when select is awakened from an x event. */
  57. --- 801,807 ----
  58.   }
  59.   
  60.   short check_win_events(ch)
  61. ! char *ch;  /* This is intended to be a pointer to a single character */
  62.   /* This routine returns a constant starting with WE_ defined in window.h.  It
  63.      takes care of handling all window events and is called from 
  64.      main_event_loop() in xperfmon.c when select is awakened from an x event. */
  65.  
  66. csh> diff -c xperfmon.c orig/xperfmon.c
  67.  
  68. *** xperfmon.c    Thu May 18 09:43:39 1989
  69. --- orig/xperfmon.c    Thu May 18 09:44:03 1989
  70. ***************
  71. *** 133,139 ****
  72.   }
  73.   
  74.   short handle_key(ch)
  75. ! int    ch;
  76.   /* This routine interprets the key that was pressed on top of the window. 
  77.      It returns TRUE if Quit has been selected, signaling that the program is
  78.      done. */
  79. --- 133,139 ----
  80.   }
  81.   
  82.   short handle_key(ch)
  83. ! char ch;
  84.   /* This routine interprets the key that was pressed on top of the window. 
  85.      It returns TRUE if Quit has been selected, signaling that the program is
  86.      done. */
  87. ***************
  88. *** 186,192 ****
  89.   {
  90.     short done = FALSE;
  91.     int nfound;
  92. !   int    ch;
  93.     int event_flag;
  94.     fd_set display_fd_set;
  95.     int *values;
  96. --- 186,192 ----
  97.   {
  98.     short done = FALSE;
  99.     int nfound;
  100. !   char ch;
  101.     int event_flag;
  102.     fd_set display_fd_set;
  103.     int *values;
  104.  
  105. -----------------------------------------------------------------------
  106.